﻿using Domain;
using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.AppService.SSDAppServoice
{
    public class SSDAppServoice : ISSDAppServoice
    {
        private readonly ISSDRepository sSDRepository;

        public SSDAppServoice(ISSDRepository sSDRepository)
        {
            this.sSDRepository = sSDRepository;
        }

        /// <summary>
        ///新增
        /// </summary>
        /// <param name="ssd"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task<bool> AddSSDAsync(SSD ssd)
        {
            return sSDRepository.AddSSDAsync(ssd);
        }
        //删除
        public Task<bool> DeleteSSDAsync(int id)
        {
           return sSDRepository.DeleteSSDAsync(id);
        }

        //查询全部
        public Task<List<SSD>> SelectSSDAsync()
        {
          return sSDRepository.SelectSSDAsync();
        }
        //条件查询
        public Task<List<SSD>> SelectSSDStandardIdAsync(string StandardId)
        {
           return sSDRepository.SelectSSDStandardIdAsync(StandardId);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="ssd"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public Task<bool> UpdateSSDAsync(SSD ssd)
        {
            return sSDRepository.UpdateSSDAsync(ssd);
        }
    }
}
